package com.xhl.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xhl.dao.IProductDao;
import com.xhl.vo.Pager;
import com.xhl.vo.ProductVO;

@Service
public class ProductService implements IProductDao {

    @Autowired
    IProductDao iProductDao;

    @Override
    public List<ProductVO> queryProduct(Pager<?> p) {
        return iProductDao.queryProduct(p);
    }

    @Override
    public long count(String cid) {
        return iProductDao.count(cid);
    }

    @Override
    public void addProduct(ProductVO pvo) {
        iProductDao.addProduct(pvo);
    }

    @Override
    public void deleteProduct(String id) {
        iProductDao.deleteProduct(id);
    }

    @Override
    public void updateProduct(ProductVO pvo) {
        iProductDao.updateProduct(pvo);
    }

    @Override
    public ProductVO queryProductPid(String pid) {
        return iProductDao.queryProductPid(pid);
    }

    @Override
    public List<ProductVO> queryFuzzyName(String name) {
        return iProductDao.queryFuzzyName(name);
    }

}
